﻿using Application.IAppSrevices;
using AutoMapper;
using Domain.Entitys;
using Domain.Repositorys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.AppSrevices
{
    public class MCService : IMCService
    {
        private readonly IMapper mapper;
        private readonly IMCRepositoy  mCRepositoy;
        public MCService(IMapper mapper, IMCRepositoy  mCRepositoy)
        {
            this.mapper = mapper;
            this.mCRepositoy = mCRepositoy;
        }
        public List<HF> HFDFenYe(int a, int b, string? s1, DateTime? s2, DateTime? s3)
        {
            return mCRepositoy.HFDFenYe(a, b, s1, s2, s3);
        }
        public int HFDCount(string? s1, DateTime? s2, DateTime? s3)
        {
            return mCRepositoy.HFDCount(s1, s2, s3);
        }
        public Task<HF> GetHFDById(int id)
        {
            return mCRepositoy.GetHFDById(id);
        }

        public async Task<int> MCAdd(MC mc)
        {
            return await mCRepositoy.MCAdd(mc);
        }

        public int HFDUpdate(int id, string fd, string fn, string sd, string sn, string td, string tn, string kd, string kn, string md, string mn, string salary)
        {
            return mCRepositoy.HFDUpdate(id, fd, fn, sd, sn, td, tn, kd, kn, md, mn, salary);
        }

        public List<MC> MCFenYe(int a, int b, string? s1, DateTime? s2, DateTime? s3)
        {
            return mCRepositoy.MCFenYe(a, b, s1, s2, s3);
        }

        public int MCCount(string? s1, DateTime? s2, DateTime? s3)
        {
            return mCRepositoy.MCCount(s1, s2, s3);
        }

        public async Task<MC> GetMCById(int id)
        {
            return await mCRepositoy.GetMCById(id);
        }

        public int MCUpdate(MC mc)
        {
            return mCRepositoy.MCUpdate(mc);
        }

        public List<MC> MCFenYe2(int a, int b, string? s1, DateTime? s2, DateTime? s3)
        {
            return mCRepositoy.MCFenYe2(a, b, s1, s2, s3);
        }

        public int MCCount2(string? s1, DateTime? s2, DateTime? s3)
        {
            return mCRepositoy.MCCount2(s1, s2, s3);
        }
    }
}
